package com.ds.dsfans.magicapi.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ds.dsfans.magicapi.mapper.MagicApiFileBackupMapper;
import com.ds.dsfans.magicapi.domain.MagicApiFileBackup;
import com.ds.dsfans.magicapi.service.IMagicApiFileBackupService;
import com.ds.dsfans.common.core.text.Convert;

/**
 * 脚本备份Service业务层处理
 * 
 * @author dsfans
 * @date 2024-07-11
 */
@Service
public class MagicApiFileBackupServiceImpl implements IMagicApiFileBackupService 
{
    @Autowired
    private MagicApiFileBackupMapper magicApiFileBackupMapper;

    /**
     * 查询脚本备份
     * 
     * @param id 脚本备份主键
     * @return 脚本备份
     */
    @Override
    public MagicApiFileBackup selectMagicApiFileBackupById(String id)
    {
        return magicApiFileBackupMapper.selectMagicApiFileBackupById(id);
    }

    /**
     * 查询脚本备份列表
     * 
     * @param magicApiFileBackup 脚本备份
     * @return 脚本备份
     */
    @Override
    public List<MagicApiFileBackup> selectMagicApiFileBackupList(MagicApiFileBackup magicApiFileBackup)
    {
        return magicApiFileBackupMapper.selectMagicApiFileBackupList(magicApiFileBackup);
    }

    /**
     * 新增脚本备份
     * 
     * @param magicApiFileBackup 脚本备份
     * @return 结果
     */
    @Override
    public int insertMagicApiFileBackup(MagicApiFileBackup magicApiFileBackup)
    {
        return magicApiFileBackupMapper.insertMagicApiFileBackup(magicApiFileBackup);
    }

    /**
     * 修改脚本备份
     * 
     * @param magicApiFileBackup 脚本备份
     * @return 结果
     */
    @Override
    public int updateMagicApiFileBackup(MagicApiFileBackup magicApiFileBackup)
    {
        return magicApiFileBackupMapper.updateMagicApiFileBackup(magicApiFileBackup);
    }

    /**
     * 批量删除脚本备份
     * 
     * @param ids 需要删除的脚本备份主键
     * @return 结果
     */
    @Override
    public int deleteMagicApiFileBackupByIds(String ids)
    {
        return magicApiFileBackupMapper.deleteMagicApiFileBackupByIds(Convert.toStrArray(ids));
    }

    /**
     * 删除脚本备份信息
     * 
     * @param id 脚本备份主键
     * @return 结果
     */
    @Override
    public int deleteMagicApiFileBackupById(String id)
    {
        return magicApiFileBackupMapper.deleteMagicApiFileBackupById(id);
    }
}
